/*
 */

package com.railway.news.model;

import java.util.List;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;

import cn.org.rapid_framework.util.DateConvertUtils;

import com.railway.common.base.BaseEntity;

/**
 * @author jiangcheng
 * @version 1.0
 * @since 1.0
 */

public class Category extends BaseEntity implements java.io.Serializable {
	
	private static final long serialVersionUID = 5454155825314635342L;
	private String maintainernames = null;
    private String maintainerid = null;
    private String checkernames = null;
    private String checkerid = null;
    private String visitornames = null;
    private String visitorid = null;
	private String permituids = null;
	// date formats
	public static final String FORMAT_CREATE_TIME = DATE_FORMAT;

	// 可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	// columns START
	@Length(max = 32)
	private java.lang.String id;
	@Length(max = 32)
	private java.lang.String parentId;
	@Length(max = 32)
	private java.lang.String sid;
	@Length(max = 200)
	private java.lang.String names;
	@Length(max = 500)
	private java.lang.String descs;

	private Integer orderNo;

	private Integer state;
	@Length(max = 3)
	private java.lang.String caTypes;
	@Length(max = 3)
	private java.lang.String isCheck;
	@Length(max = 3)
	private java.lang.String publicType;
	@Length(max = 32)
	private java.lang.String creator;

	private java.util.Date createTime;

	private List<News> newsList;
	// columns END

	public Category() {
	}

	public Category(java.lang.String id) {
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}

	public java.lang.String getId() {
		return this.id;
	}

	public void setParentId(java.lang.String value) {
		this.parentId = value;
	}

	public java.lang.String getParentId() {
		return this.parentId;
	}

	public void setSid(java.lang.String value) {
		this.sid = value;
	}

	public java.lang.String getSid() {
		return this.sid;
	}

	public void setNames(java.lang.String value) {
		this.names = value;
	}

	public java.lang.String getNames() {
		return this.names;
	}

	public void setDescs(java.lang.String value) {
		this.descs = value;
	}

	public java.lang.String getDescs() {
		return this.descs;
	}

	public void setOrderNo(Integer value) {
		this.orderNo = value;
	}

	public Integer getOrderNo() {
		return this.orderNo;
	}

	public void setState(Integer value) {
		this.state = value;
	}

	public Integer getState() {
		return this.state;
	}

	public void setCaTypes(java.lang.String value) {
		this.caTypes = value;
	}

	public java.lang.String getCaTypes() {
		return this.caTypes;
	}

	public void setIsCheck(java.lang.String value) {
		this.isCheck = value;
	}

	public java.lang.String getIsCheck() {
		return this.isCheck;
	}

	public void setPublicType(java.lang.String value) {
		this.publicType = value;
	}

	public java.lang.String getPublicType() {
		return this.publicType;
	}

	public void setCreator(java.lang.String value) {
		this.creator = value;
	}

	public java.lang.String getCreator() {
		return this.creator;
	}

	public String getCreateTimeString() {
		return DateConvertUtils.format(getCreateTime(), FORMAT_CREATE_TIME);
	}

	public void setCreateTimeString(String value) {
		setCreateTime(DateConvertUtils.parse(value, FORMAT_CREATE_TIME,
				java.util.Date.class));
	}

	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}

	public java.util.Date getCreateTime() {
		return this.createTime;
	}

	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
				.append("Id", getId()).append("ParentId", getParentId())
				.append("Sid", getSid()).append("Names", getNames()).append(
						"Descs", getDescs()).append("OrderNo", getOrderNo())
				.append("State", getState()).append("CaTypes", getCaTypes())
				.append("IsCheck", getIsCheck()).append("PublicType",
						getPublicType()).append("Creator", getCreator())
				.append("CreateTime", getCreateTime()).toString();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getId()).toHashCode();
	}

	public boolean equals(Object obj) {
		if (obj instanceof Category == false)
			return false;
		if (this == obj)
			return true;
		Category other = (Category) obj;
		return new EqualsBuilder().append(getId(), other.getId()).isEquals();
	}

	public String getPermituids() {
		return permituids;
	}

	public void setPermituids(String permituids) {
		this.permituids = permituids;
	}

	public List<News> getNewsList() {
		return newsList;
	}

	public void setNewsList(List<News> newsList) {
		this.newsList = newsList;
	}

	public String getMaintainerid() {
		return maintainerid;
	}

	public void setMaintainerid(String maintainerid) {
		this.maintainerid = maintainerid;
	}

	public String getCheckerid() {
		return checkerid;
	}

	public void setCheckerid(String checkerid) {
		this.checkerid = checkerid;
	}

	public String getVisitorid() {
		return visitorid;
	}

	public void setVisitorid(String visitorid) {
		this.visitorid = visitorid;
	}

	public String getMaintainernames() {
		return maintainernames;
	}

	public void setMaintainernames(String maintainernames) {
		this.maintainernames = maintainernames;
	}

	public String getCheckernames() {
		return checkernames;
	}

	public void setCheckernames(String checkernames) {
		this.checkernames = checkernames;
	}

	public String getVisitornames() {
		return visitornames;
	}

	public void setVisitornames(String visitornames) {
		this.visitornames = visitornames;
	}
}
